function openNewTab(url,callback){
   return  chrome.tabs.create({
        url: url
    },tab=>{
        callback&&callback(tab)
    })
}
const optionsList = document.querySelector('.option-list')
const optGame = document.querySelector('.option-newtab_game')
const optQuiz = document.querySelector('.option-newtab_quiz')
optionsList.addEventListener('click',function (e) {
    const tar = e.target
    let url = ''
    if (tar.className.indexOf('option-newtab_game')!=-1) {
        url = './html/game.html';
    }else if(tar.className.indexOf('option-newtab_quiz')!=-1){
        url = './html/index.html'
    }

    console.log(tar,"target")
    openNewTab(url);
})